package com.rxm.ys.feign;

import com.rxm.ys.Rs;
import com.rxm.ys.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Description
 * @Author FengYi
 * @Date 2020-05-27 13:48
 */
@FeignClient(value = "ys-user", fallback = UserClientFallback.class)
public interface UserClient {

    @GetMapping("/user/getById")
    Rs<User> getById(@RequestParam("id") Long id);

    @GetMapping("/user/getByCode")
    Rs<User> getByCode(@RequestParam("code") String code);
}
